package com.sure.supermarketserver.common;

public class CurrentUser {

    public static final String SESSION_ATTR_NAME="CurrentUser";//session属性名字

    /**
     * 头像存储位置
     */
    public static final String AVATAR_DIR = "I:/Sophomore_second/0project/touxiang";

    public static final String DEFAULT_PASSWORD = "111111";

    private String userId;
    private String userName;
    private String userTel;
    private String userSex;
    private String avatar;//头像地址
    private String userPwd;

    public CurrentUser(String userId, String userName, String userTel, String userSex, String avatar, String userPwd) {
        this.userId = userId;
        this.userName = userName;
        this.userTel = userTel;
        this.userSex = userSex;
        this.avatar = avatar;
        this.userPwd = userPwd;
    }

    public static String getAvatarDir() {
        return AVATAR_DIR;
    }

    public static String getDefaultPassword() {
        return DEFAULT_PASSWORD;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public static String getSessionAttrName() {
        return SESSION_ATTR_NAME;
    }

    public CurrentUser() {
    }

    public CurrentUser(String userId) {
        this.userId = userId;
    }

    public CurrentUser(String userId, String userName,String userTel,String userSex, String avatar) {
        this.userId = userId;
        this.userName = userName;
        this.userTel = userTel;
        this.userSex = userSex;
        this.avatar = avatar;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserTel() {
        return userTel;
    }

    public void setUserTel(String userTel) {
        this.userTel = userTel;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
}
